Some conventional hand-held game apparatuses are each provided with a gyro sensor. In a conventional hand-held game apparatus, when the game apparatus is moved by a user, a rotation angle based on the movement by the user is detected by using the gyro sensor. A virtual camera in a virtual space is moved in accordance with the detected rotation angle, and an image of a virtual object or the like in the virtual space is taken by the virtual camera, thereby generating an image. Thus, in the above game apparatus, a position of the virtual camera is moved by moving the hand-held game apparatus, and the virtual object viewed from various points of view can be displayed.
However, when the hand-held game apparatus described above includes a display device for displaying a stereoscopically visible image, visibility of stereoscopically visible images can be impaired in some cases.
Therefore, the present application discloses a storage medium having stored therein an image generation program, an image generation method, an image generation apparatus, and an image generation system which are capable of improving visibility.
The image generation program stored in the computer-readable storage medium according to the present application is executed on a computer of a display device including a display section for displaying a stereoscopically visible image. The image generation program causes the computer to execute: setting a virtual stereo camera in a predetermined virtual space; obtaining a stereoscopically visible image by using the virtual stereo camera; and activating camera control for controlling an orientation of the virtual stereo camera in accordance with an orientation of the display section. Furthermore, when the camera control is activated, the image generation program causes the computer to execute: receiving a predetermined activation operation performed by a user and activating the camera control based on the activation operation; obtaining, based on a reference orientation which is the orientation of the display section when the activation operation is received, a change amount of the orientation of the display section from the reference orientation as a display section orientation change amount; controlling the orientation of the virtual stereo camera based on the display section orientation change amount; adjusting, based at least on a directional component in a roll direction of the display section orientation change amount, the virtual stereo camera so as to reduce a degree of stereoscopic effect of the image obtained by using the virtual stereo camera.
According to the above exemplary configuration, when the orientation of the display section is changed with respect to the directional component in the roll direction, the degree of stereoscopic effect is reduced so as to be smaller as a change amount of a rotation angle in the roll direction from the reference position is larger. Thereby, a situation in which stereoscopic display is not properly viewed can be prevented. Furthermore, the virtual stereo camera is controlled based on the change amount from the reference orientation which is a position of the display section when the activation operation is performed by the user. Consequently, in a case where the user performs the activation operation after the orientation of the virtual stereo camera is changed, the virtual stereo camera can be prevented from moving suddenly.
In another exemplary configuration, the image generation program may further cause the computer to execute controlling the virtual stereo camera so that the degree of stereoscopic effect becomes zero when the directional component in the roll direction of the display section orientation change amount exceeds a predetermined threshold for stereoscopic effect degree adjustment.
According to the above exemplary configuration, when a change in the orientation of the display section with respect to the directional component in the roll direction exceeds a certain value, an image with no stereoscopic effect is displayed. Thereby, a situation in which stereoscopic display is not properly viewed can be prevented.
In another exemplary configuration, the image generation program may further cause the computer to execute moving an object based on an operation performed by the user. At this time, the position of the virtual stereo camera may be set based on the position of the moved object.
In another exemplary configuration, the object may be moved also when the virtual camera control is activated.
According to the above exemplary configuration, the virtual stereo camera is set based on the position of the object. Accordingly, the virtual stereo camera can be set appropriately in accordance with the position of the object.
In another exemplary configuration, a change amount of the camera orientation may be limited.
According to the above exemplary configuration, the orientation of the virtual stereo camera is changed only within a predetermined range. Accordingly, a situation in which the user moves the apparatus vigorously and stereoscopic display is not properly viewed can be prevented.
According to the above, a storage medium having stored therein an image generation program, an image generation method, an image generation apparatus, and an image generation system which are capable of improving visibility can be provided.
These and other objects, features, aspects and advantages will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.